home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2004 April / Gamestar_61_2004-04_dvdb.iso / DVDStar / Editace / hltp.exe / {app} / Source Code / Half-Life Model Viewer / src / smmdl.c < prev    next >
C/C++ Source or Header  |  1999-04-28  |  1KB  |  51 lines

  1. //
  2. //                 Half-Life Model Viewer (c) 1999 by Mete Ciragan
  3. //
  4. // file:           smmdl.c
  5. // last modified:  Apr 28 1999, Mete Ciragan
  6. // copyright:      The programs and associated files contained in this
  7. //                 distribution were developed by Mete Ciragan. The programs
  8. //                 are not in the public domain, but they are freely
  9. //                 distributable without licensing fees. These programs are
  10. //                 provided without guarantee or warrantee expressed or
  11. //                 implied.
  12. //
  13. // version:        1.2
  14. //
  15. // email:          mete@swissquake.ch
  16. // web:            http://www.swissquake.ch/chumbalum-soft/
  17. //
  18. // this one cleans up driver names
  19. //
  20. #include <windows.h>
  21. #include <string.h>
  22.  
  23.  
  24.  
  25. int
  26. main (int argc, char *argv[])
  27. {
  28.     char szName[256], szPath[256], *ptr;
  29.  
  30.     Sleep (2000);
  31.  
  32.     GetModuleFileName (NULL, szName, 256);
  33.     ptr = strrchr (szName, '\\');
  34.     *ptr = '\0';
  35.     GetCurrentDirectory (256, szPath);
  36.     SetCurrentDirectory (szName);
  37.  
  38.     CopyFile ("opengl32.dll", "3dfxgl.dll", FALSE);
  39.     DeleteFile ("opengl32.dll");
  40.  
  41.     DeleteFile ("hlmv.cfg");
  42.  
  43.     Sleep (2000);
  44.  
  45.     WinExec ("hlmv.exe", SW_SHOW);
  46.  
  47.     SetCurrentDirectory (szPath);
  48.  
  49.     return 0;
  50. }
  51.